Previous Book Contents Book Index Next

Inside Macintosh: QuickDraw GX Graphics /
Chapter 4 - Geometric Operations / Geometric Operations Reference
Functions / Determining Whether Two Areas Touch


GXTouchesRectanglePoint

You can use the GXTouchesRectanglePoint function to determine if a point lies within or on the edge of a rectangle.

gxBoolean GXTouchesRectanglePoint(const gxRectangle *target, 
                                  const gxPoint *test);
target
A pointer to the rectangle to test as the container.
test
A pointer to the point to test for inclusion.
function result
A Boolean value indicating whether the point touches the rectangle.
DESCRIPTION
The GXTouchesRectanglePoint function returns true as its function result if the point specified by the test parameter lies within or on the edge of the rectangle specified by the target parameter, and returns false otherwise.

Notice that the parameters to this function are not shapes; they are pointers to a gxPoint or to a gxRectangle structure.

ERRORS, WARNINGS, AND NOTICES
Errors
parameter_is_nil
SEE ALSO
For a discussion of the gxPoint and gxRectangle data structures, see Chapter 2, "Geometric Shapes," in this book.

To determine if a rectangle touches a shape, use the GXTouchesBoundsShape function, described in the next section.

To determine if a rectangle contains a shape, use the GXContainsBoundsShape function, described on page 4-101.


Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996